


export const count = (state=2000,action )=>{
      const {type,payload} = action ;
      console.log(action)
      switch(type){
        case "CountADD":
        return state+1 ;

        case "DESCACTION":
        return state-1;
        break;

        case "changeCount":
        return state+payload;  // 深拷贝 
        break;

        default:
        return state;
        break;
      }
}